package cn.td.spring.example;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class testuser {
    public  static void  main(String[] args){

//springframework在ioc容器内创建对象
    AnnotationConfigApplicationContext context = new  AnnotationConfigApplicationContext("cn.td.Spring.example");
     User user  =context.getBean(User.class);
     user.run();
    }
}
